package com.book.oauth.server.project.hystrix.impl;

import com.book.common.api.impl.BaseHystrixImpl;
import com.book.oauth.server.project.dto.ProjectModelDto;
import com.book.oauth.server.project.vo.ProjectModelVo;
import com.book.oauth.server.project.hystrix.IProjectModelHystrix;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * Description：项目模块关系 HystrixImpl
 * @Author： leo
 * @CreateDate： 2020-12-31
 * @Email： leo.xiong@suyun360.com
 * Version: 1.0
 */
@Slf4j
@Component
public class ProjectModelHystrixImpl extends BaseHystrixImpl<ProjectModelDto, ProjectModelVo> implements FallbackFactory<IProjectModelHystrix>, IProjectModelHystrix {

    @Override
    public IProjectModelHystrix create(Throwable e) {
        log.error("oauth-server.ProjectModelHystrixImpl.项目模块关系服务调用失败:{}", e.getMessage());
        e.printStackTrace();
        return new ProjectModelHystrixImpl();
    }
}
